<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>lacewing.moo.server.MooServerProtocol</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="lacewing-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://mp2.dk">Python Lacewing Library</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="lacewing-module.html">Package&nbsp;lacewing</a> ::
        <a href="lacewing.moo-module.html">Package&nbsp;moo</a> ::
        <a href="lacewing.moo.server-module.html">Module&nbsp;server</a> ::
        Class&nbsp;MooServerProtocol
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="lacewing.moo.server.MooServerProtocol-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class MooServerProtocol</h1><p class="nomargin-top"><span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol">source&nbsp;code</a></span></p>
<pre class="base-tree">
twisted.internet.protocol.BaseProtocol --+        
                                         |        
        twisted.internet.protocol.Protocol --+    
                                             |    
                          <a href="lacewing.moo.protocol.MooProtocol-class.html">protocol.MooProtocol</a> --+
                                                 |
                                                <strong class="uidshort">MooServerProtocol</strong>
</pre>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Instance Methods</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lacewing.moo.server.MooServerProtocol-class.html#connectionMade" class="summary-sig-name">connectionMade</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Called when a connection is made.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.connectionMade">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lacewing.moo.server.MooServerProtocol-class.html#connectionLost" class="summary-sig-name">connectionLost</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">reason</span>)</span><br />
      Called when the connection is shut down.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.connectionLost">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lacewing.moo.server.MooServerProtocol-class.html#loaderReceived" class="summary-sig-name">loaderReceived</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">loader</span>)</span><br />
      Called upon receiving a packet from the other end.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.loaderReceived">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="acceptConnection"></a><span class="summary-sig-name">acceptConnection</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Return False to stop the server from sending a welcome to the client</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.acceptConnection">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="acceptNameChange"></a><span class="summary-sig-name">acceptNameChange</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">oldName</span>,
        <span class="summary-sig-arg">newName</span>)</span><br />
      Return False to decline the client to change it's name (after setting
      the inital name)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.acceptNameChange">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="acceptChannelJoin"></a><span class="summary-sig-name">acceptChannelJoin</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">channelName</span>)</span><br />
      Return False to stop the client from joining the specified channel</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.acceptChannelJoin">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="acceptChannelMessage"></a><span class="summary-sig-name">acceptChannelMessage</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">channel</span>,
        <span class="summary-sig-arg">message</span>,
        <span class="summary-sig-arg">subchannel</span>)</span><br />
      Return False to stop the channel message from being sent to the other
      channel members</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.acceptChannelMessage">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="acceptPrivateMessage"></a><span class="summary-sig-name">acceptPrivateMessage</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">channel</span>,
        <span class="summary-sig-arg">connection</span>,
        <span class="summary-sig-arg">message</span>,
        <span class="summary-sig-arg">subchannel</span>)</span><br />
      Return False to stop the private message from reaching the recipient</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.acceptPrivateMessage">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="acceptChannelLeave"></a><span class="summary-sig-name">acceptChannelLeave</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">channel</span>)</span><br />
      Return False to stop the client from leaving the specified channel</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.acceptChannelLeave">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="connectionAccepted"></a><span class="summary-sig-name">connectionAccepted</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Called when the connection has been accepted, and the client 
      notified.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.connectionAccepted">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="nameSet"></a><span class="summary-sig-name">nameSet</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span><br />
      Called after the name has been set</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.nameSet">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="nameChanged"></a><span class="summary-sig-name">nameChanged</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">oldName</span>,
        <span class="summary-sig-arg">newName</span>)</span><br />
      Called when the client has changed name</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.nameChanged">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lacewing.moo.server.MooServerProtocol-class.html#messageReceived" class="summary-sig-name">messageReceived</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">message</span>,
        <span class="summary-sig-arg">subchannel</span>)</span><br />
      Called upon receiving a client message.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.messageReceived">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="channelJoined"></a><span class="summary-sig-name">channelJoined</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">channel</span>)</span><br />
      Called when the client has been let into a channel</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.channelJoined">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lacewing.moo.server.MooServerProtocol-class.html#channelMessageReceived" class="summary-sig-name">channelMessageReceived</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">channel</span>,
        <span class="summary-sig-arg">message</span>,
        <span class="summary-sig-arg">subchannel</span>)</span><br />
      Called after a channel message has been relayed.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.channelMessageReceived">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lacewing.moo.server.MooServerProtocol-class.html#privateMessageReceived" class="summary-sig-name">privateMessageReceived</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">channel</span>,
        <span class="summary-sig-arg">player</span>,
        <span class="summary-sig-arg">message</span>,
        <span class="summary-sig-arg">subchannel</span>)</span><br />
      Called after a private message has been relayed.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.privateMessageReceived">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="channelLeft"></a><span class="summary-sig-name">channelLeft</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">channel</span>)</span><br />
      Called when the client has left a channel</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.channelLeft">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="lacewing.moo.server.MooServerProtocol-class.html#getHost" class="summary-sig-name">getHost</a>(<span class="summary-sig-arg">self</span>)</span><br />
      This method returns the IP address of the connection.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.getHost">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="changeName"></a><span class="summary-sig-name">changeName</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.changeName">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="sendMessage"></a><span class="summary-sig-name">sendMessage</span>(<span class="summary-sig-arg">value</span>,
        <span class="summary-sig-arg">subchannel</span>,
        <span class="summary-sig-arg">type</span>=<span class="summary-sig-default">None</span>)</span><br />
      Sends a message to the other end</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.sendMessage">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="sendChannelMessage"></a><span class="summary-sig-name">sendChannelMessage</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">channel</span>,
        <span class="summary-sig-arg">*arg</span>,
        <span class="summary-sig-arg">**kw</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.sendChannelMessage">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="joinChannel"></a><span class="summary-sig-name">joinChannel</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">channelName</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.joinChannel">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="leaveChannel"></a><span class="summary-sig-name">leaveChannel</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">channel</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.leaveChannel">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lacewing.moo.protocol.MooProtocol-class.html">protocol.MooProtocol</a></code></b>:
      <code><a href="lacewing.moo.protocol.MooProtocol-class.html#__init__">__init__</a></code>,
      <code><a href="lacewing.moo.protocol.MooProtocol-class.html#dataReceived">dataReceived</a></code>,
      <code><a href="lacewing.moo.protocol.MooProtocol-class.html#sendLoader">sendLoader</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.internet.protocol.Protocol</code></b>:
      <code>__provides__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.internet.protocol.BaseProtocol</code></b>:
      <code>__providedBy__</code>,
      <code>makeConnection</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Class Variables</span></td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lacewing.moo.protocol.MooProtocol-class.html">protocol.MooProtocol</a></code></b>:
      <code><a href="lacewing.moo.protocol.MooProtocol-class.html#channels">channels</a></code>,
      <code><a href="lacewing.moo.protocol.MooProtocol-class.html#id">id</a></code>,
      <code><a href="lacewing.moo.protocol.MooProtocol-class.html#isAccepted">isAccepted</a></code>,
      <code><a href="lacewing.moo.protocol.MooProtocol-class.html#name">name</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.internet.protocol.Protocol</code></b>:
      <code>__implemented__</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>twisted.internet.protocol.BaseProtocol</code></b>:
      <code>connected</code>,
      <code>transport</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="connectionMade"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">connectionMade</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.connectionMade">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Called when a connection is made.</p>
  <p>This may be considered the initializer of the protocol, because it is 
  called when the connection is completed.  For clients, this is called 
  once the connection to the server has been established; for servers, this
  is called after an accept() call stops blocking and a socket has been 
  received.  If you need to send any greeting or initial message, do it 
  here.</p>
  <dl class="fields">
    <dt>Overrides:
        twisted.internet.protocol.BaseProtocol.connectionMade
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="connectionLost"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">connectionLost</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">reason</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.connectionLost">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Called when the connection is shut down.</p>
  <p>Clear any circular references here, and any external references to 
  this Protocol.  The connection has been closed.</p>
  <dl class="fields">
    <dt>Overrides:
        twisted.internet.protocol.Protocol.connectionLost
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="loaderReceived"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">loaderReceived</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">loader</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.loaderReceived">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Called upon receiving a packet from the other end.</p>
  <dl class="fields">
    <dt>Overrides:
        <a href="lacewing.moo.protocol.MooProtocol-class.html#loaderReceived">protocol.MooProtocol.loaderReceived</a>
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="messageReceived"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">messageReceived</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">message</span>,
        <span class="sig-arg">subchannel</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.messageReceived">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Called upon receiving a client message.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>message</code></strong> (<a href="lacewing.moo.packetloaders.message.Message-class.html" 
          class="link">Message</a> object)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="channelMessageReceived"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">channelMessageReceived</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">channel</span>,
        <span class="sig-arg">message</span>,
        <span class="sig-arg">subchannel</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.channelMessageReceived">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Called after a channel message has been relayed.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>message</code></strong> (lacewing.moo.packetloaders.message.Message object)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="privateMessageReceived"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">privateMessageReceived</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">channel</span>,
        <span class="sig-arg">player</span>,
        <span class="sig-arg">message</span>,
        <span class="sig-arg">subchannel</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.privateMessageReceived">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Called after a private message has been relayed.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>message</code></strong> (lacewing.moo.packetloaders.message.Message object)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="getHost"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getHost</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="lacewing.moo.server-pysrc.html#MooServerProtocol.getHost">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>This method returns the IP address of the connection. Override if you 
  would like to hide/edit the IP</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="lacewing-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://mp2.dk">Python Lacewing Library</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Thu Dec 22 06:19:59 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
